package com.chinacoal.microservice.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.chinacoal.microservice.pojo.CcmsSmartleasingRepair;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 维修记录-mybatis-plus接口类
 * @date 2020-11-10 14：01
 */
public interface CcmsSmartleasingRepairMapper extends BaseMapper<CcmsSmartleasingRepair> {

    /**
     * @Description: 批量删除（批量修改）
     * @author zhuliang
     * @date 2020/11/12 11:51
     */
    void updateToDeleteById(@Param("deleteSign") String deleteSign,
                            @Param("lastUpdateDate") Date lastUpdateDate,
                            @Param("pkRepairId") String[] pkRepairId,
                            @Param("lastUpdatedBy") Integer lastUpdatedBy,
                            @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                            @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 查询所有的维修记录带分页
     * @author zhuliang
     * @date 2020/11/23 11:23
     */
    List<CcmsSmartleasingRepair> getAllByPage(Page<CcmsSmartleasingRepair> toPage,
                                              @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                              @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 根据维修记录id查询维修记录信息
     * @author zhuliang
     * @date 2020/11/23 11:31
     */
    CcmsSmartleasingRepair getRepairById(@Param("pkRepairId") String pkRepairId,
                                         @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                         @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 条件查询所有的维修记录带分页
     * @author zhuliang
     * @date 2020/11/23 11:53
     */
    List<CcmsSmartleasingRepair> getAllByCondition(@Param("firstDate") Date firstDate,
                                                   @Param("endDate") Date endDate,
                                                   @Param("fkAdministrationId") String fkAdministrationId,
                                                   @Param("inputString") String inputString,
                                                   @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                                   Page<CcmsSmartleasingRepair> toPage);
}
